# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-fireflyalgorithm
_pkgorig=FireflyAlgorithm
pkgver=0.3.2
pkgrel=0
pkgdesc="Implementation of Firefly Algorithm for optimization in Python"
url="https://github.com/firefly-cpp/FireflyAlgorithm"
arch="noarch"
license="MIT"
depends="python3 py3-numpy"
makedepends="py3-build py3-poetry-core py3-wheel py3-installer"
checkdepends="py3-pytest"
source="https://github.com/firefly-cpp/FireflyAlgorithm/archive/$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/FireflyAlgorithm-$pkgver"

build() {
	GIT_DIR="$builddir" python3 -m build --no-isolation --wheel
}

check() {
	python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/fireflyalgorithm-$pkgver-py3-none-any.whl
}

sha512sums="
bcfd2119d18b85783d31167ba7ed0c1a0b4062beb4fa1f4edc7811c6824dc03a6117fb198ed204798a0f7825debf20b3977f5d80ca72dcbed6ffc30cf78de8cc  FireflyAlgorithm-0.3.2.tar.gz
"
